<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // document对象
        // referrer，返回载入当前的文档，前一个url  
        // document.referrer 如果他不是超链接访问，他的值为空
        // url 返回当前url
        
        // 最重要的
        //id值
        document.getElementById()
        //class值
        document.getElementsByClassName()
        // tag标签
        document.getElementsByTagName()
        // name
        // document.getElementsByClassName
        // write()写
    </script>
</head>
<body>
    <img src="./img/d1.jpg" alt="">
    <a href="./cj.html">抽奖</a><br>
    <div id="d1" class="c1">123</div>
    <div id="d2" class="c2">456</div>
    <span id="c1">123</span>
    <input type="button" value="改变123" onclick="gb()">
    <input type="button" value="获取季节" onclick="gb1()">
    
    <input type="text" value="春" name="season">
    <input type="text" value="夏" name="season">
    <input type="text" value="秋" name="season">
    <input type="text" value="冬" name="season">
    <script>
        function gb(){
            document.getElementById("d1").
            innerHTML="hhhhhhhhhhhhhhhhhhhhh"


        }
        function gb1(){
            let sj=document.getElementsByName("season").innerHTML="hhhhhhhhhh"
            let str="";
            for(let i=0;i<sj.length;i++){
                str+=sj[i].value+"<br/>"
            }
            document.write(str);

        }

    </script>
</body>
</html>